package com.cuicuisha.gxyp.manager.controller;

import com.cuicuisha.gxyp.manager.service.SysRoleUserService;
import com.cuicuisha.gxyp.model.dto.system.AssginRoleDto;
import com.cuicuisha.gxyp.model.vo.common.Result;
import com.cuicuisha.gxyp.model.vo.common.ResultCodeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * ClassName: SysRoleUserController
 * Description:
 *
 * @Author 脆脆鲨
 * @Create 2024-09-13 17:12
 * @Version 1.0
 */
@RestController
@CrossOrigin(allowCredentials = "true" , originPatterns = "*" , allowedHeaders = "*")
@RequestMapping("/admin/system/sysRoleUser")
public class SysRoleUserController {

    @Autowired
    private SysRoleUserService sysRoleUserService;

    @PostMapping("/doAssign")
    public Result doAssign(@RequestBody AssginRoleDto assginRoleDto) {
        sysRoleUserService.doAssign(assginRoleDto);
        return Result.build(null, ResultCodeEnum.SUCCESS);
    }

}
